<!--{if $opertype == "input"}-->
<div class="login_one_tc">
	<div class="login_close" title="关闭" onclick="$.tbox.close();return false;"><a href="javascript:void(0)"></a></div>
	<div class="login_twobox">
			<li>
				<!--{if $type == "nostock"}-->
					到货通知：
				<!--{else}-->
					降价通知：
				<!--{/if}-->
				<!--{$item.itemname}-->
			</li>
			<!--{if !$item}-->
			<p class="loginhint">商品不存在</p>
            <!--{else}-->
			<p class="loginhint">Email或手机至少填写一个</p>
			
			<li>
				<div class="login_left">Email通知我：</div>
				<input name="email"  id="email" type="text" class="login_butt" onfocus="Item.removeborder(this)"/> 
			</li>
			<li>
				<div class="login_left">短信通知我：</div>
				<input name="mobile" id="mobile" type="text" class="login_butt" onfocus="Item.removeborder(this)"/> 
			</li>
			<p class="loginhint"></p>
            <div class="clear"></div>
            <div class="login_but">
				<input type="hidden" value="<!--{$type}-->" name="type"/>
                <input type="submit" class="o_button" value="确 定" id="login_btn" onclick="checknotify();return false;"/>
			</div>
			<!--{/if}-->
	</div>
</div>
<script type="text/javascript">
	$("#email,#mobile").keydown(function(event){
		if(event.keyCode == 13) {
			checknotify();
		}
	});
    function checknotify() {
        var $email		= $("#email"),
			$mobile		= $("#mobile"),
			email		= $email.val(),
			mobile		= $mobile.val(),
			can			= true;
		if(!email && !mobile) {
			$email.addClass("hintborder");
			can  = false;
		}
		
		if(email && !$.util.isemail(email)) {
			$email.addClass("hintborder");
			can = false;
		}
		//判断手机号是否正确
		if(mobile && mobile.length != 11) {
			$mobile.addClass("hintborder");
			can = false;
		}
		if(!can) return false;
        var postdata = {email:email,mobile:mobile,itemid:'<!--{$itemid}-->',productid:'<!--{$productid}-->'};
        $.tbox.popup("<!--{url('index','item','savenotify')}-->","post",postdata);
    }
</script>
<!--{elseif $opertype == "save"}-->
<div class="tc2">
    <div class="tc3">
        <h1>
            <a class="closeimg" onclick="$.tbox.close()"></a>
        </h1>
        <div>
			<div class="forimg">
				<img src="template/front/<!--{$tpl}-->/images/mynotify.gif" width="59" height="39"/>
			</div>
			<div class="frotet">
				<p>
					 <!--{$info}-->
				</p>
			</div>
        </div>
    </div>
</div>
<!--{/if}-->
